<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-string类</title>
</head>
<body>
<script>
  var str="Hello";
  var str1=new String("world");
  console.log(str);
  console.log(typeof str);
  console.log(str1);
  console.log(typeof str1);
  console.log((str + str1).length);
  console.log(str1.charAt(1));
  console.log(str.substr(2));
  console.log(str.substring(2));
  console.log(str.substr(1, 2));
  console.log(str.substring(1, 3));
  console.log(str.toUpperCase());
  console.log(str1.toUpperCase());
  console.log(str.toLowerCase());
  var info="name=zyh,age=18,address=武汉";
  var strings = info.split(",");
  console.log(strings);
  var url="http://localhost:63342/html-code/day04-JavaScript/views/01-string类.html?_ijt=8ok6cuuhumfdqn35ei8c65s1mq&_ij_reload=RELOAD_ON_SAVE"
  let s1 = encodeURIComponent(url);
  console.log(s1);
  console.log(decodeURIComponent(s1));
</script>
</body>
</html>